//
//  UIView+JWAddition.m
//
//  Created by ChenJunWen on 2017/11/28.
//  Copyright © 2017年 CJW. All rights reserved.
//

#import "UIView+JWAddition.h"

@implementation UIView (JWAddition)

- (UIImage *)jw_snapshotImage {

    UIGraphicsBeginImageContextWithOptions(self.bounds.size, YES, 0);
    
    [self drawViewHierarchyInRect:self.bounds afterScreenUpdates:YES];
    
    UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
    
    UIGraphicsEndImageContext();
    
    return result;
}

@end
